//
//  NewMediaDetailViewController.m
//  TryShopping
//
//  Created by LiYinDi on 16/7/6.
//  Copyright © 2016年 RuiBen. All rights reserved.
//

#import "NewMediaDetailViewController.h"

@interface NewMediaDetailViewController ()

@end

@implementation NewMediaDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setAutoLayout];
}
- (IBAction)backAction:(id)sender {
    
   [self.navigationController  popViewControllerAnimated:YES];
}

-(void)setAutoLayout
{
    
    [_topView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view.mas_left);
        make.right.equalTo(self.view.mas_right);
        make.top.equalTo(self.view.mas_top);
        make.height.equalTo(@64);
    }];
    [_topLineLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_topView.mas_left);
        make.right.equalTo(_topView.mas_right);
        make.bottom.equalTo(_topView.mas_bottom).with.offset(-1);
        make.height.equalTo(@1);
    }];
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(_topView.mas_centerX);
        make.height.equalTo(@30);
        make.width.equalTo(@110);
        make.top.equalTo(_topView.mas_top).with.offset(25);
    }];
    
    [_backBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(_titleLabel.mas_centerY);
        make.height.equalTo(@30);
        make.width.equalTo(@60);
        make.left.equalTo(_topView.mas_left);
    }];
    
    [_webview mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view.mas_left);
        make.right.equalTo(self.view.mas_right);
        make.top.equalTo(_topView.mas_bottom) ;
        make.bottom.equalTo(self.view.mas_bottom);
    }];
}
@end
